<div id="user_item" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}">
    <div class="mysql-item">
            <span>{{ user.getLogin() }}</span><br>
            <a href="" class="action" id="privileges_link" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}">права</a>
            <a href="" class="action" id="change_mysql_password_link" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}">пароль</a>
            <a href="" class="del" id="drop_mysql_user" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}">удалить</a>
            <div id="load_icon_drop_user" order="{{ order_name }}" base="{{ base['database'].getName() }}" user="{{ user.getLogin() }}" style="display:none">
                Отправление запроса <img alt="загрузка" src="{{ asset('bundles/billing/i/load.gif') }}">
            </div>
            <div id="privileges_content" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}" style="display:none">
                <a href='' id="select_all_rights" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}">выбрать все</a> | 
                <a href='' id="select_no_rights" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}">снять все</a>
                <table>
                    {% set height = 0 %}
                    {% for key, right in rights[user.getId()] %}
                        {% if height == 0 %}
                            <tr>    
                        {% endif %}
                        <td width="1" align="right">{{ key }}</td>
                        <td>
                            <input type="checkbox" name="priviledge" {{ right == 'Y' ? 'checked' : '' }} order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}">
                        </td>
                        {% if height == 3 %}
                            </tr>    
                        {% endif %}
                        {% set height = height + 1 %}
                        {% if height > 3 %}
                            {% set height = 0 %}
                        {% endif %}
                    {% endfor %}
                </table>
                <div id="change_status" class="red" style="display:none">изменения еще не сохранены!</div>

                <a href="" id="change_mysql_rights" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}">изменить</a>
                <div id="load_icon_change_rights" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}" style="display:none">
                    Изменение прав <img alt="загрузка" src="{{ asset('bundles/billing/i/load.gif') }}">
                </div>
            </div>

            <form id="change_mysql_user_form" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}">
            <div id="change_mysql_password_content" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}" style="display:none">
                <table>
                    <tr>
                        <tr>
                            <td>новый пароль:</td>
                        </tr>
                        <td>
                            <input type="text" name="user_mysql_change_password" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}"/>
                        </td>
                        <td class="status"></td>
                    </tr>
                </table>

                <a href="" id="generate_mysql_change_password" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}">сгенерировать</a>
                <div id="load_icon_generate_mysql_change_password" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}" style="display:none">
                    Генерация пароля <img alt="загрузка" src="{{ asset('bundles/billing/i/load.gif') }}">
                </div>

                <a href="" id="change_mysql_password" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}">изменить</a>
                <div id="load_icon_change_password" order="{{ order_name }}" user="{{ user.getLogin() }}" base="{{ base['database'].getName() }}" style="display:none">
                    Изменение пароля <img alt="загрузка" src="{{ asset('bundles/billing/i/load.gif') }}">
                </div>
            </div>
            </form>
    </div>
</div>
                        